export default {
  // 获取页面数据
  getTableData() {
    var params = {
		type:1,
      language : this.$store.getters.getLanguage
    }

    this.axiosGets("Job/imgShow", params, function(res) {
		if(res.data.code === 0) {
			this.msgSuccess(res.data.message)
			this.form = res.data.data[0]
			console.log(this.form);
			this.upImg.imageUrl = this.imgURL + this.form.file.img_url;
		}else {
			this.msgError(res.data.msg)
		}
      
    })
  },

  //编辑
  edit() {
	let params = new FormData();
				
	params.append('id', this.form.id);
	params.append('type', 1);
	params.append('language', this.$store.getters.getLanguage);
	
	if(this.upImg.file) {
		params.append('file', this.upImg.file);
	}
	
	this.axiosPostFile('Job/imgEdit', params , res => {
		if(res.data.code === 0) {
			this.msgSuccess(res.data.message)
		}else {
			this.msgError(res.data.message)
		}
	})
  },

 
}
